package com.seth.myapplication.surface;


import android.content.Intent;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.TextView;

import com.seth.myapplication.LoginActivity;
import com.seth.myapplication.R;

/**
 * Created by Seth on 2017/10/11.
 */

public class page4Fragment extends Fragment {

    private View view;
    private TextView mTextView;
    private Button login_btn;

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
        view = inflater.inflate(R.layout.forth_page_fragment, container, false);

//        mTextView = (TextView) view.findViewById(R.id.txt);
//
//        mTextView.setText("这是第四个页面！！");


        initView(view);
        initEvent();




        return view;

    }

    private void initEvent() {

        login_btn.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent = new Intent(getActivity(), LoginActivity.class);
                startActivity(intent);
            }
        });

    }

    private void initView(View view) {
        login_btn = (Button) view.findViewById(R.id.btn_login);

    }




    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

    }


}
